<div class="sidebox">	
		<h1 class="clear"><?php echo link_to('Villages Costa Brava', 'list_costa_brava_villages')  ?></h1>
		<ul class="sidemenu">
		
		  <?php if(count($nordVillages)>0): ?>
			<li><h3 class="sideboxVillageHeading">Costa Brava Nord</h3></li>
			<?php foreach($nordVillages as $village): ?>
				<?php if(isset($nomVillage) && $village->getNomVillage() == $nomVillage): ?>
				<li><?php echo link_to($village->getNomVillage(), 'village_show', $village, array('title' => $village->getDescPreVillage(), 'class' =>'selectedVillage'))  ?></li>
				<?php else: ?>
					<li><?php echo link_to($village->getNomVillage(), 'village_show', $village, array('title' => $village->getDescPreVillage()))  ?></li>
				<?php endif; ?>
			<?php endforeach ?>
	      <?php endif; ?>
		
		  
	      <?php if(count($centreVillages)>0): ?>
			<li><h3 class="sideboxVillageHeading">Costa Brava Centre</h3></li>
			<?php foreach($centreVillages as $village): ?>  
				<?php if(isset($nomVillage) && $village->getNomVillage() == $nomVillage): ?>
				<li><?php echo link_to($village->getNomVillage(), 'village_show', $village, array('title' => $village->getDescPreVillage(), 'class' =>'selectedVillage'))  ?></li>
				<?php else: ?>
					<li><?php echo link_to($village->getNomVillage(), 'village_show', $village, array('title' => $village->getDescPreVillage()))  ?></li>
				<?php endif; ?>
			<?php endforeach ?>
		  <?php endif; ?>
		  
		  
		  <?php if(count($sudVillages)>0): ?>
			<li><h3 class="sideboxVillageHeading">Costa Brava Sud</h3></li>
			<?php foreach($sudVillages as $village): ?>
				<?php if(isset($nomVillage) && $village->getNomVillage() == $nomVillage): ?>
				<li><?php echo link_to($village->getNomVillage(), 'village_show', $village, array('title' => $village->getDescPreVillage(), 'class' =>'selectedVillage'))  ?></li>
				<?php else: ?>
					<li><?php echo link_to($village->getNomVillage(), 'village_show', $village, array('title' => $village->getDescPreVillage()))  ?></li>
				<?php endif; ?>
			<?php endforeach ?>
		  <?php endif; ?>
		</ul>
</div>